/******************************************************************************
** 
** Detab, debackspace, view backslash. 
** 
** File name:	detabb.c
** Compilation:	cc detabb.c -o detabb
** Execution:	./detabb
** 
** Description:
** Reads the input and changes:
** 1. '\t' caracter to '\t' (literally).
** 2. '\b' character to '\b' (literally).
** 3. '\' character to '\\'.
** 
******************************************************************************/
#include <stdio.h>

main()
{
    int c;

    while((c=getchar()) != EOF) {
        if (c=='\t') {
            putchar('\\');
            putchar('t');
            c=0;
        }
        if (c=='\b') {      // doesnt catched in terminal :(
            putchar('\\');
            putchar('b');
            c=0;
        }
        if (c=='\\') {
            putchar('\\');
            putchar('\\');
            c=0;
        }
        putchar(c);
    }
}

